package de.slothsoft.test;

import java.awt.Color;
import java.awt.Component;
import java.awt.Graphics2D;

import de.slothsoft.commons.swing.window.AbstractMainFrame;
import de.slothsoft.games.AbstractGame;
import de.slothsoft.games.GameEvent;
import de.slothsoft.games.GamePanel;

public class GamesTestFrame extends AbstractMainFrame {

	public static void main(String[] args) {
		GamesTestFrame frame = new GamesTestFrame();
		frame.open();
	}

	private static final long serialVersionUID = 7278426698406174731L;

	@Override
	protected Component createComponents() {
		return new GamePanel(new AbstractGame() {

			@Override
			public void update(GameEvent event) {
				// TODO Auto-generated method stub

			}

			@Override
			public void render(GameEvent event) {
				Graphics2D g = event.getGraphics();
				g.setColor(Color.blue);
				g.drawRect(5, 5, g.getClipBounds().width - 10, g.getClipBounds().height - 10);
			}
		});
	}

}
